\(\int (c+d x)^3 (a+b \cot (e+f x))^3 \, dx\) [47]
Optimal result
Integrand size = 20, antiderivative size = 603 \[
\int (c+d x)^3 (a+b \cot (e+f x))^3 \, dx=-\frac {3 i b^3 d (c+d x)^2}{2 f^2}-\frac {3 i a b^2 (c+d x)^3}{f}-\frac {b^3 (c+d x)^3}{2 f}+\frac {a^3 (c+d x)^4}{4 d}-\frac {3 i a^2 b (c+d x)^4}{4 d}-\frac {3 a b^2 (c+d x)^4}{4 d}+\frac {i b^3 (c+d x)^4}{4 d}-\frac {3 b^3 d (c+d x)^2 \cot (e+f x)}{2 f^2}-\frac {3 a b^2 (c+d x)^3 \cot (e+f x)}{f}-\frac {b^3 (c+d x)^3 \cot ^2(e+f x)}{2 f}+\frac {3 b^3 d^2 (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f^3}+\frac {9 a b^2 d (c+d x)^2 \log \left (1-e^{2 i (e+f x)}\right )}{f^2}+\frac {3 a^2 b (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {b^3 (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {3 i b^3 d^3 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^4}-\frac {9 i a b^2 d^2 (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{f^3}-\frac {9 i a^2 b d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {3 i b^3 d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {9 a b^2 d^3 \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^4}+\frac {9 a^2 b d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}-\frac {3 b^3 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}+\frac {9 i a^2 b d^3 \operatorname {PolyLog}\left (4,e^{2 i (e+f x)}\right )}{4 f^4}-\frac {3 i b^3 d^3 \operatorname {PolyLog}\left (4,e^{2 i (e+f x)}\right )}{4 f^4}
\]
[Out]
-9/2*I*a^2*b*d*(d*x+c)^2*polylog(2,exp(2*I*(f*x+e)))/f^2+1/4*I*b^3*(d*x+c)^4/d-1/2*b^3*(d*x+c)^3/f+1/4*a^3*(d*
x+c)^4/d+3/2*I*b^3*d*(d*x+c)^2*polylog(2,exp(2*I*(f*x+e)))/f^2-3/4*a*b^2*(d*x+c)^4/d-3/4*I*a^2*b*(d*x+c)^4/d-3
/2*b^3*d*(d*x+c)^2*cot(f*x+e)/f^2-3*a*b^2*(d*x+c)^3*cot(f*x+e)/f-1/2*b^3*(d*x+c)^3*cot(f*x+e)^2/f+3*b^3*d^2*(d
*x+c)*ln(1-exp(2*I*(f*x+e)))/f^3+9*a*b^2*d*(d*x+c)^2*ln(1-exp(2*I*(f*x+e)))/f^2+3*a^2*b*(d*x+c)^3*ln(1-exp(2*I
*(f*x+e)))/f-b^3*(d*x+c)^3*ln(1-exp(2*I*(f*x+e)))/f-3/4*I*b^3*d^3*polylog(4,exp(2*I*(f*x+e)))/f^4-3/2*I*b^3*d^
3*polylog(2,exp(2*I*(f*x+e)))/f^4-3*I*a*b^2*(d*x+c)^3/f-9*I*a*b^2*d^2*(d*x+c)*polylog(2,exp(2*I*(f*x+e)))/f^3+
9/2*a*b^2*d^3*polylog(3,exp(2*I*(f*x+e)))/f^4+9/2*a^2*b*d^2*(d*x+c)*polylog(3,exp(2*I*(f*x+e)))/f^3-3/2*b^3*d^
2*(d*x+c)*polylog(3,exp(2*I*(f*x+e)))/f^3+9/4*I*a^2*b*d^3*polylog(4,exp(2*I*(f*x+e)))/f^4-3/2*I*b^3*d*(d*x+c)^
2/f^2
Rubi [A] (verified)
Time = 1.21 (sec) , antiderivative size = 603, normalized size of antiderivative = 1.00, number of
steps used = 28, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.550, Rules used = {3803, 3798, 2221, 2611,
6744, 2320, 6724, 3801, 32, 2317, 2438} \[
\int (c+d x)^3 (a+b \cot (e+f x))^3 \, dx=\frac {a^3 (c+d x)^4}{4 d}+\frac {9 a^2 b d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}-\frac {9 i a^2 b d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {3 a^2 b (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {3 i a^2 b (c+d x)^4}{4 d}+\frac {9 i a^2 b d^3 \operatorname {PolyLog}\left (4,e^{2 i (e+f x)}\right )}{4 f^4}-\frac {9 i a b^2 d^2 (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{f^3}+\frac {9 a b^2 d (c+d x)^2 \log \left (1-e^{2 i (e+f x)}\right )}{f^2}-\frac {3 a b^2 (c+d x)^3 \cot (e+f x)}{f}-\frac {3 i a b^2 (c+d x)^3}{f}-\frac {3 a b^2 (c+d x)^4}{4 d}+\frac {9 a b^2 d^3 \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^4}-\frac {3 b^3 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}+\frac {3 b^3 d^2 (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f^3}+\frac {3 i b^3 d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}-\frac {3 b^3 d (c+d x)^2 \cot (e+f x)}{2 f^2}-\frac {b^3 (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {b^3 (c+d x)^3 \cot ^2(e+f x)}{2 f}-\frac {3 i b^3 d (c+d x)^2}{2 f^2}-\frac {b^3 (c+d x)^3}{2 f}+\frac {i b^3 (c+d x)^4}{4 d}-\frac {3 i b^3 d^3 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^4}-\frac {3 i b^3 d^3 \operatorname {PolyLog}\left (4,e^{2 i (e+f x)}\right )}{4 f^4}
\]
[In]
Int[(c + d*x)^3*(a + b*Cot[e + f*x])^3,x]
[Out]
(((-3*I)/2)*b^3*d*(c + d*x)^2)/f^2 - ((3*I)*a*b^2*(c + d*x)^3)/f - (b^3*(c + d*x)^3)/(2*f) + (a^3*(c + d*x)^4)
/(4*d) - (((3*I)/4)*a^2*b*(c + d*x)^4)/d - (3*a*b^2*(c + d*x)^4)/(4*d) + ((I/4)*b^3*(c + d*x)^4)/d - (3*b^3*d*
(c + d*x)^2*Cot[e + f*x])/(2*f^2) - (3*a*b^2*(c + d*x)^3*Cot[e + f*x])/f - (b^3*(c + d*x)^3*Cot[e + f*x]^2)/(2
*f) + (3*b^3*d^2*(c + d*x)*Log[1 - E^((2*I)*(e + f*x))])/f^3 + (9*a*b^2*d*(c + d*x)^2*Log[1 - E^((2*I)*(e + f*
x))])/f^2 + (3*a^2*b*(c + d*x)^3*Log[1 - E^((2*I)*(e + f*x))])/f - (b^3*(c + d*x)^3*Log[1 - E^((2*I)*(e + f*x)
)])/f - (((3*I)/2)*b^3*d^3*PolyLog[2, E^((2*I)*(e + f*x))])/f^4 - ((9*I)*a*b^2*d^2*(c + d*x)*PolyLog[2, E^((2*
I)*(e + f*x))])/f^3 - (((9*I)/2)*a^2*b*d*(c + d*x)^2*PolyLog[2, E^((2*I)*(e + f*x))])/f^2 + (((3*I)/2)*b^3*d*(
c + d*x)^2*PolyLog[2, E^((2*I)*(e + f*x))])/f^2 + (9*a*b^2*d^3*PolyLog[3, E^((2*I)*(e + f*x))])/(2*f^4) + (9*a
^2*b*d^2*(c + d*x)*PolyLog[3, E^((2*I)*(e + f*x))])/(2*f^3) - (3*b^3*d^2*(c + d*x)*PolyLog[3, E^((2*I)*(e + f*
x))])/(2*f^3) + (((9*I)/4)*a^2*b*d^3*PolyLog[4, E^((2*I)*(e + f*x))])/f^4 - (((3*I)/4)*b^3*d^3*PolyLog[4, E^((
2*I)*(e + f*x))])/f^4
Rule 32
Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]
Rule 2221
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
(f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x]
- Dist[d*(m/(b*f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
Rule 2317
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
Rule 2320
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]
Rule 2438
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
e, n}, x] && EqQ[c*d, 1]
Rule 2611
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(
f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Dist[g*(m/(b*c*n*Log[F])), Int[(f + g*
x)^(m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]
Rule 3798
Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + Pi*(k_.) + (f_.)*(x_)], x_Symbol] :> Simp[I*((c + d*x)^(m + 1)/(d*(
m + 1))), x] - Dist[2*I, Int[(c + d*x)^m*E^(2*I*k*Pi)*(E^(2*I*(e + f*x))/(1 + E^(2*I*k*Pi)*E^(2*I*(e + f*x))))
, x], x] /; FreeQ[{c, d, e, f}, x] && IntegerQ[4*k] && IGtQ[m, 0]
Rule 3801
Int[((c_.) + (d_.)*(x_))^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b*(c + d*x)^m*((b*Tan[e
+ f*x])^(n - 1)/(f*(n - 1))), x] + (-Dist[b*d*(m/(f*(n - 1))), Int[(c + d*x)^(m - 1)*(b*Tan[e + f*x])^(n - 1)
, x], x] - Dist[b^2, Int[(c + d*x)^m*(b*Tan[e + f*x])^(n - 2), x], x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n,
1] && GtQ[m, 0]
Rule 3803
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Tan[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]
Rule 6724
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]
Rule 6744
Int[((e_.) + (f_.)*(x_))^(m_.)*PolyLog[n_, (d_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(p_.)], x_Symbol] :> Simp
[(e + f*x)^m*(PolyLog[n + 1, d*(F^(c*(a + b*x)))^p]/(b*c*p*Log[F])), x] - Dist[f*(m/(b*c*p*Log[F])), Int[(e +
f*x)^(m - 1)*PolyLog[n + 1, d*(F^(c*(a + b*x)))^p], x], x] /; FreeQ[{F, a, b, c, d, e, f, n, p}, x] && GtQ[m,
0]
Rubi steps \begin{align*}
\text {integral}& = \int \left (a^3 (c+d x)^3+3 a^2 b (c+d x)^3 \cot (e+f x)+3 a b^2 (c+d x)^3 \cot ^2(e+f x)+b^3 (c+d x)^3 \cot ^3(e+f x)\right ) \, dx \\ & = \frac {a^3 (c+d x)^4}{4 d}+\left (3 a^2 b\right ) \int (c+d x)^3 \cot (e+f x) \, dx+\left (3 a b^2\right ) \int (c+d x)^3 \cot ^2(e+f x) \, dx+b^3 \int (c+d x)^3 \cot ^3(e+f x) \, dx \\ & = \frac {a^3 (c+d x)^4}{4 d}-\frac {3 i a^2 b (c+d x)^4}{4 d}-\frac {3 a b^2 (c+d x)^3 \cot (e+f x)}{f}-\frac {b^3 (c+d x)^3 \cot ^2(e+f x)}{2 f}-\left (6 i a^2 b\right ) \int \frac {e^{2 i (e+f x)} (c+d x)^3}{1-e^{2 i (e+f x)}} \, dx-\left (3 a b^2\right ) \int (c+d x)^3 \, dx-b^3 \int (c+d x)^3 \cot (e+f x) \, dx+\frac {\left (9 a b^2 d\right ) \int (c+d x)^2 \cot (e+f x) \, dx}{f}+\frac {\left (3 b^3 d\right ) \int (c+d x)^2 \cot ^2(e+f x) \, dx}{2 f} \\ & = -\frac {3 i a b^2 (c+d x)^3}{f}+\frac {a^3 (c+d x)^4}{4 d}-\frac {3 i a^2 b (c+d x)^4}{4 d}-\frac {3 a b^2 (c+d x)^4}{4 d}+\frac {i b^3 (c+d x)^4}{4 d}-\frac {3 b^3 d (c+d x)^2 \cot (e+f x)}{2 f^2}-\frac {3 a b^2 (c+d x)^3 \cot (e+f x)}{f}-\frac {b^3 (c+d x)^3 \cot ^2(e+f x)}{2 f}+\frac {3 a^2 b (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}+\left (2 i b^3\right ) \int \frac {e^{2 i (e+f x)} (c+d x)^3}{1-e^{2 i (e+f x)}} \, dx+\frac {\left (3 b^3 d^2\right ) \int (c+d x) \cot (e+f x) \, dx}{f^2}-\frac {\left (9 a^2 b d\right ) \int (c+d x)^2 \log \left (1-e^{2 i (e+f x)}\right ) \, dx}{f}-\frac {\left (18 i a b^2 d\right ) \int \frac {e^{2 i (e+f x)} (c+d x)^2}{1-e^{2 i (e+f x)}} \, dx}{f}-\frac {\left (3 b^3 d\right ) \int (c+d x)^2 \, dx}{2 f} \\ & = -\frac {3 i b^3 d (c+d x)^2}{2 f^2}-\frac {3 i a b^2 (c+d x)^3}{f}-\frac {b^3 (c+d x)^3}{2 f}+\frac {a^3 (c+d x)^4}{4 d}-\frac {3 i a^2 b (c+d x)^4}{4 d}-\frac {3 a b^2 (c+d x)^4}{4 d}+\frac {i b^3 (c+d x)^4}{4 d}-\frac {3 b^3 d (c+d x)^2 \cot (e+f x)}{2 f^2}-\frac {3 a b^2 (c+d x)^3 \cot (e+f x)}{f}-\frac {b^3 (c+d x)^3 \cot ^2(e+f x)}{2 f}+\frac {9 a b^2 d (c+d x)^2 \log \left (1-e^{2 i (e+f x)}\right )}{f^2}+\frac {3 a^2 b (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {b^3 (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {9 i a^2 b d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {\left (9 i a^2 b d^2\right ) \int (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right ) \, dx}{f^2}-\frac {\left (18 a b^2 d^2\right ) \int (c+d x) \log \left (1-e^{2 i (e+f x)}\right ) \, dx}{f^2}-\frac {\left (6 i b^3 d^2\right ) \int \frac {e^{2 i (e+f x)} (c+d x)}{1-e^{2 i (e+f x)}} \, dx}{f^2}+\frac {\left (3 b^3 d\right ) \int (c+d x)^2 \log \left (1-e^{2 i (e+f x)}\right ) \, dx}{f} \\ & = -\frac {3 i b^3 d (c+d x)^2}{2 f^2}-\frac {3 i a b^2 (c+d x)^3}{f}-\frac {b^3 (c+d x)^3}{2 f}+\frac {a^3 (c+d x)^4}{4 d}-\frac {3 i a^2 b (c+d x)^4}{4 d}-\frac {3 a b^2 (c+d x)^4}{4 d}+\frac {i b^3 (c+d x)^4}{4 d}-\frac {3 b^3 d (c+d x)^2 \cot (e+f x)}{2 f^2}-\frac {3 a b^2 (c+d x)^3 \cot (e+f x)}{f}-\frac {b^3 (c+d x)^3 \cot ^2(e+f x)}{2 f}+\frac {3 b^3 d^2 (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f^3}+\frac {9 a b^2 d (c+d x)^2 \log \left (1-e^{2 i (e+f x)}\right )}{f^2}+\frac {3 a^2 b (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {b^3 (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {9 i a b^2 d^2 (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{f^3}-\frac {9 i a^2 b d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {3 i b^3 d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {9 a^2 b d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}-\frac {\left (9 a^2 b d^3\right ) \int \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right ) \, dx}{2 f^3}+\frac {\left (9 i a b^2 d^3\right ) \int \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right ) \, dx}{f^3}-\frac {\left (3 b^3 d^3\right ) \int \log \left (1-e^{2 i (e+f x)}\right ) \, dx}{f^3}-\frac {\left (3 i b^3 d^2\right ) \int (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right ) \, dx}{f^2} \\ & = -\frac {3 i b^3 d (c+d x)^2}{2 f^2}-\frac {3 i a b^2 (c+d x)^3}{f}-\frac {b^3 (c+d x)^3}{2 f}+\frac {a^3 (c+d x)^4}{4 d}-\frac {3 i a^2 b (c+d x)^4}{4 d}-\frac {3 a b^2 (c+d x)^4}{4 d}+\frac {i b^3 (c+d x)^4}{4 d}-\frac {3 b^3 d (c+d x)^2 \cot (e+f x)}{2 f^2}-\frac {3 a b^2 (c+d x)^3 \cot (e+f x)}{f}-\frac {b^3 (c+d x)^3 \cot ^2(e+f x)}{2 f}+\frac {3 b^3 d^2 (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f^3}+\frac {9 a b^2 d (c+d x)^2 \log \left (1-e^{2 i (e+f x)}\right )}{f^2}+\frac {3 a^2 b (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {b^3 (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {9 i a b^2 d^2 (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{f^3}-\frac {9 i a^2 b d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {3 i b^3 d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {9 a^2 b d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}-\frac {3 b^3 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}+\frac {\left (9 i a^2 b d^3\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(3,x)}{x} \, dx,x,e^{2 i (e+f x)}\right )}{4 f^4}+\frac {\left (9 a b^2 d^3\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,x)}{x} \, dx,x,e^{2 i (e+f x)}\right )}{2 f^4}+\frac {\left (3 i b^3 d^3\right ) \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{2 i (e+f x)}\right )}{2 f^4}+\frac {\left (3 b^3 d^3\right ) \int \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right ) \, dx}{2 f^3} \\ & = -\frac {3 i b^3 d (c+d x)^2}{2 f^2}-\frac {3 i a b^2 (c+d x)^3}{f}-\frac {b^3 (c+d x)^3}{2 f}+\frac {a^3 (c+d x)^4}{4 d}-\frac {3 i a^2 b (c+d x)^4}{4 d}-\frac {3 a b^2 (c+d x)^4}{4 d}+\frac {i b^3 (c+d x)^4}{4 d}-\frac {3 b^3 d (c+d x)^2 \cot (e+f x)}{2 f^2}-\frac {3 a b^2 (c+d x)^3 \cot (e+f x)}{f}-\frac {b^3 (c+d x)^3 \cot ^2(e+f x)}{2 f}+\frac {3 b^3 d^2 (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f^3}+\frac {9 a b^2 d (c+d x)^2 \log \left (1-e^{2 i (e+f x)}\right )}{f^2}+\frac {3 a^2 b (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {b^3 (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {3 i b^3 d^3 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^4}-\frac {9 i a b^2 d^2 (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{f^3}-\frac {9 i a^2 b d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {3 i b^3 d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {9 a b^2 d^3 \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^4}+\frac {9 a^2 b d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}-\frac {3 b^3 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}+\frac {9 i a^2 b d^3 \operatorname {PolyLog}\left (4,e^{2 i (e+f x)}\right )}{4 f^4}-\frac {\left (3 i b^3 d^3\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(3,x)}{x} \, dx,x,e^{2 i (e+f x)}\right )}{4 f^4} \\ & = -\frac {3 i b^3 d (c+d x)^2}{2 f^2}-\frac {3 i a b^2 (c+d x)^3}{f}-\frac {b^3 (c+d x)^3}{2 f}+\frac {a^3 (c+d x)^4}{4 d}-\frac {3 i a^2 b (c+d x)^4}{4 d}-\frac {3 a b^2 (c+d x)^4}{4 d}+\frac {i b^3 (c+d x)^4}{4 d}-\frac {3 b^3 d (c+d x)^2 \cot (e+f x)}{2 f^2}-\frac {3 a b^2 (c+d x)^3 \cot (e+f x)}{f}-\frac {b^3 (c+d x)^3 \cot ^2(e+f x)}{2 f}+\frac {3 b^3 d^2 (c+d x) \log \left (1-e^{2 i (e+f x)}\right )}{f^3}+\frac {9 a b^2 d (c+d x)^2 \log \left (1-e^{2 i (e+f x)}\right )}{f^2}+\frac {3 a^2 b (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {b^3 (c+d x)^3 \log \left (1-e^{2 i (e+f x)}\right )}{f}-\frac {3 i b^3 d^3 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^4}-\frac {9 i a b^2 d^2 (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{f^3}-\frac {9 i a^2 b d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {3 i b^3 d (c+d x)^2 \operatorname {PolyLog}\left (2,e^{2 i (e+f x)}\right )}{2 f^2}+\frac {9 a b^2 d^3 \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^4}+\frac {9 a^2 b d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}-\frac {3 b^3 d^2 (c+d x) \operatorname {PolyLog}\left (3,e^{2 i (e+f x)}\right )}{2 f^3}+\frac {9 i a^2 b d^3 \operatorname {PolyLog}\left (4,e^{2 i (e+f x)}\right )}{4 f^4}-\frac {3 i b^3 d^3 \operatorname {PolyLog}\left (4,e^{2 i (e+f x)}\right )}{4 f^4} \\
\end{align*}
Mathematica [B] (warning: unable to verify)
Both result and optimal contain complex but leaf count is larger than twice the leaf count of
optimal. \(3129\) vs. \(2(603)=1206\).
Time = 8.22 (sec) , antiderivative size = 3129, normalized size of antiderivative = 5.19
\[
\int (c+d x)^3 (a+b \cot (e+f x))^3 \, dx=\text {Result too large to show}
\]
[In]
Integrate[(c + d*x)^3*(a + b*Cot[e + f*x])^3,x]
[Out]
((-(b^3*c^3) - 3*b^3*c^2*d*x - 3*b^3*c*d^2*x^2 - b^3*d^3*x^3)*Csc[e + f*x]^2)/(2*f) - (3*a*b^2*d^3*E^(I*e)*Csc
[e]*((2*f^3*x^3)/E^((2*I)*e) + (3*I)*(1 - E^((-2*I)*e))*f^2*x^2*Log[1 - E^((-I)*(e + f*x))] + (3*I)*(1 - E^((-
2*I)*e))*f^2*x^2*Log[1 + E^((-I)*(e + f*x))] - 6*(1 - E^((-2*I)*e))*f*x*PolyLog[2, -E^((-I)*(e + f*x))] - 6*(1
- E^((-2*I)*e))*f*x*PolyLog[2, E^((-I)*(e + f*x))] + (6*I)*(1 - E^((-2*I)*e))*PolyLog[3, -E^((-I)*(e + f*x))]
+ (6*I)*(1 - E^((-2*I)*e))*PolyLog[3, E^((-I)*(e + f*x))]))/(2*f^4) - (3*a^2*b*c*d^2*E^(I*e)*Csc[e]*((2*f^3*x
^3)/E^((2*I)*e) + (3*I)*(1 - E^((-2*I)*e))*f^2*x^2*Log[1 - E^((-I)*(e + f*x))] + (3*I)*(1 - E^((-2*I)*e))*f^2*
x^2*Log[1 + E^((-I)*(e + f*x))] - 6*(1 - E^((-2*I)*e))*f*x*PolyLog[2, -E^((-I)*(e + f*x))] - 6*(1 - E^((-2*I)*
e))*f*x*PolyLog[2, E^((-I)*(e + f*x))] + (6*I)*(1 - E^((-2*I)*e))*PolyLog[3, -E^((-I)*(e + f*x))] + (6*I)*(1 -
E^((-2*I)*e))*PolyLog[3, E^((-I)*(e + f*x))]))/(2*f^3) + (b^3*c*d^2*E^(I*e)*Csc[e]*((2*f^3*x^3)/E^((2*I)*e) +
(3*I)*(1 - E^((-2*I)*e))*f^2*x^2*Log[1 - E^((-I)*(e + f*x))] + (3*I)*(1 - E^((-2*I)*e))*f^2*x^2*Log[1 + E^((-
I)*(e + f*x))] - 6*(1 - E^((-2*I)*e))*f*x*PolyLog[2, -E^((-I)*(e + f*x))] - 6*(1 - E^((-2*I)*e))*f*x*PolyLog[2
, E^((-I)*(e + f*x))] + (6*I)*(1 - E^((-2*I)*e))*PolyLog[3, -E^((-I)*(e + f*x))] + (6*I)*(1 - E^((-2*I)*e))*Po
lyLog[3, E^((-I)*(e + f*x))]))/(2*f^3) - (3*a^2*b*d^3*E^(I*e)*Csc[e]*((f^4*x^4)/E^((2*I)*e) + (2*I)*(1 - E^((-
2*I)*e))*f^3*x^3*Log[1 - E^((-I)*(e + f*x))] + (2*I)*(1 - E^((-2*I)*e))*f^3*x^3*Log[1 + E^((-I)*(e + f*x))] -
6*(1 - E^((-2*I)*e))*f^2*x^2*PolyLog[2, -E^((-I)*(e + f*x))] - 6*(1 - E^((-2*I)*e))*f^2*x^2*PolyLog[2, E^((-I)
*(e + f*x))] + (12*I)*(1 - E^((-2*I)*e))*f*x*PolyLog[3, -E^((-I)*(e + f*x))] + (12*I)*(1 - E^((-2*I)*e))*f*x*P
olyLog[3, E^((-I)*(e + f*x))] + 12*(1 - E^((-2*I)*e))*PolyLog[4, -E^((-I)*(e + f*x))] + 12*(1 - E^((-2*I)*e))*
PolyLog[4, E^((-I)*(e + f*x))]))/(4*f^4) + (b^3*d^3*E^(I*e)*Csc[e]*((f^4*x^4)/E^((2*I)*e) + (2*I)*(1 - E^((-2*
I)*e))*f^3*x^3*Log[1 - E^((-I)*(e + f*x))] + (2*I)*(1 - E^((-2*I)*e))*f^3*x^3*Log[1 + E^((-I)*(e + f*x))] - 6*
(1 - E^((-2*I)*e))*f^2*x^2*PolyLog[2, -E^((-I)*(e + f*x))] - 6*(1 - E^((-2*I)*e))*f^2*x^2*PolyLog[2, E^((-I)*(
e + f*x))] + (12*I)*(1 - E^((-2*I)*e))*f*x*PolyLog[3, -E^((-I)*(e + f*x))] + (12*I)*(1 - E^((-2*I)*e))*f*x*Pol
yLog[3, E^((-I)*(e + f*x))] + 12*(1 - E^((-2*I)*e))*PolyLog[4, -E^((-I)*(e + f*x))] + 12*(1 - E^((-2*I)*e))*Po
lyLog[4, E^((-I)*(e + f*x))]))/(4*f^4) + (3*b^3*c*d^2*Csc[e]*(-(f*x*Cos[e]) + Log[Cos[f*x]*Sin[e] + Cos[e]*Sin
[f*x]]*Sin[e]))/(f^3*(Cos[e]^2 + Sin[e]^2)) + (9*a*b^2*c^2*d*Csc[e]*(-(f*x*Cos[e]) + Log[Cos[f*x]*Sin[e] + Cos
[e]*Sin[f*x]]*Sin[e]))/(f^2*(Cos[e]^2 + Sin[e]^2)) + (3*a^2*b*c^3*Csc[e]*(-(f*x*Cos[e]) + Log[Cos[f*x]*Sin[e]
+ Cos[e]*Sin[f*x]]*Sin[e]))/(f*(Cos[e]^2 + Sin[e]^2)) - (b^3*c^3*Csc[e]*(-(f*x*Cos[e]) + Log[Cos[f*x]*Sin[e] +
Cos[e]*Sin[f*x]]*Sin[e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3*Sin[2*e])/((-1 + Cos[2*e] + I*Sin[2*e])*(1 + Cos[2*e] + Cos[4*e] + I*Sin[2*e] + I
*Sin[4*e])) + ((-2*I)*b^3*c^3*Cos[4*e] + 2*b^3*c^3*Sin[4*e])/((-1 + Cos[2*e] + I*Sin[2*e])*(1 + Cos[2*e] + Cos
[4*e] + I*Sin[2*e] + I*Sin[4*e])) - (I*b^3*c^3)/(-1 + Cos[6*e] + I*Sin[6*e]) + ((-I)*b^3*c^3*Cos[6*e] + b^3*c^
3*Sin[6*e])/(-1 + Cos[6*e] + I*Sin[6*e])) + (3*Csc[e]*Csc[e + f*x]*(b^3*c^2*d*Sin[f*x] + 2*a*b^2*c^3*f*Sin[f*x
] + 2*b^3*c*d^2*x*Sin[f*x] + 6*a*b^2*c^2*d*f*x*Sin[f*x] + b^3*d^3*x^2*Sin[f*x] + 6*a*b^2*c*d^2*f*x^2*Sin[f*x]
+ 2*a*b^2*d^3*f*x^3*Sin[f*x]))/(2*f^2) - (3*b^3*d^3*Csc[e]*Sec[e]*(E^(I*ArcTan[Tan[e]])*f^2*x^2 + ((I*f*x*(-Pi
+ 2*ArcTan[Tan[e]]) - Pi*Log[1 + E^((-2*I)*f*x)] - 2*(f*x + ArcTan[Tan[e]])*Log[1 - E^((2*I)*(f*x + ArcTan[Ta
n[e]]))] + Pi*Log[Cos[f*x]] + 2*ArcTan[Tan[e]]*Log[Sin[f*x + ArcTan[Tan[e]]]] + I*PolyLog[2, E^((2*I)*(f*x + A
rcTan[Tan[e]]))])*Tan[e])/Sqrt[1 + Tan[e]^2]))/(2*f^4*Sqrt[Sec[e]^2*(Cos[e]^2 + Sin[e]^2)]) - (9*a*b^2*c*d^2*C
sc[e]*Sec[e]*(E^(I*ArcTan[Tan[e]])*f^2*x^2 + ((I*f*x*(-Pi + 2*ArcTan[Tan[e]]) - Pi*Log[1 + E^((-2*I)*f*x)] - 2
*(f*x + ArcTan[Tan[e]])*Log[1 - E^((2*I)*(f*x + ArcTan[Tan[e]]))] + Pi*Log[Cos[f*x]] + 2*ArcTan[Tan[e]]*Log[Si
n[f*x + ArcTan[Tan[e]]]] + I*PolyLog[2, E^((2*I)*(f*x + ArcTan[Tan[e]]))])*Tan[e])/Sqrt[1 + Tan[e]^2]))/(f^3*S
qrt[Sec[e]^2*(Cos[e]^2 + Sin[e]^2)]) - (9*a^2*b*c^2*d*Csc[e]*Sec[e]*(E^(I*ArcTan[Tan[e]])*f^2*x^2 + ((I*f*x*(-
Pi + 2*ArcTan[Tan[e]]) - Pi*Log[1 + E^((-2*I)*f*x)] - 2*(f*x + ArcTan[Tan[e]])*Log[1 - E^((2*I)*(f*x + ArcTan[
Tan[e]]))] + Pi*Log[Cos[f*x]] + 2*ArcTan[Tan[e]]*Log[Sin[f*x + ArcTan[Tan[e]]]] + I*PolyLog[2, E^((2*I)*(f*x +
ArcTan[Tan[e]]))])*Tan[e])/Sqrt[1 + Tan[e]^2]))/(2*f^2*Sqrt[Sec[e]^2*(Cos[e]^2 + Sin[e]^2)]) + (3*b^3*c^2*d*C
sc[e]*Sec[e]*(E^(I*ArcTan[Tan[e]])*f^2*x^2 + ((I*f*x*(-Pi + 2*ArcTan[Tan[e]]) - Pi*Log[1 + E^((-2*I)*f*x)] - 2
*(f*x + ArcTan[Tan[e]])*Log[1 - E^((2*I)*(f*x + ArcTan[Tan[e]]))] + Pi*Log[Cos[f*x]] + 2*ArcTan[Tan[e]]*Log[Si
n[f*x + ArcTan[Tan[e]]]] + I*PolyLog[2, E^((2*I)*(f*x + ArcTan[Tan[e]]))])*Tan[e])/Sqrt[1 + Tan[e]^2]))/(2*f^2
*Sqrt[Sec[e]^2*(Cos[e]^2 + Sin[e]^2)])
Maple [B] (verified)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf
count of optimal. 3160 vs. \(2 (535 ) = 1070\).
Time = 0.94 (sec) , antiderivative size = 3161, normalized size of antiderivative =
5.24
| | |
method | result | size |
| | |
risch |
\(\text {Expression too large to display}\) |
\(3161\) |
| |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*(f*x+e))+1)*x-6/f^3*b^3*d^3*polylog(3,-exp(I*(f*x+e)))*x+6/f^4*b^3*e*d^3*ln(exp(I*(f*x+e)))-
3/f^4*b^3*e*d^3*ln(exp(I*(f*x+e))-1)+18/f^4*b^2*a*d^3*polylog(3,exp(I*(f*x+e)))+18/f^4*b^2*a*d^3*polylog(3,-ex
p(I*(f*x+e)))-2/f^4*b^3*e^3*d^3*ln(exp(I*(f*x+e)))+1/f^4*b^3*e^3*d^3*ln(exp(I*(f*x+e))-1)-1/f*b^3*d^3*ln(exp(I
*(f*x+e))+1)*x^3+3/f^4*b^3*d^3*ln(1-exp(I*(f*x+e)))*e+3/2*I*b^3*d*c^2*x^2-3/4*I*d^3*a^2*b*x^4-3*d^2*a*b^2*c*x^
3-9/2*d*a*b^2*c^2*x^2+3*I*a^2*b*c^3*x+3/4*I/d*a^2*b*c^4-36*I/f^2*b^2*d^2*c*a*e*x+18*I/f^2*b*e^2*d^2*c*a^2*x-18
*I/f*b*d*c^2*a^2*e*x-18*I/f^2*b*a^2*c*d^2*polylog(2,exp(I*(f*x+e)))*x-18*I/f^2*b*a^2*c*d^2*polylog(2,-exp(I*(f
*x+e)))*x
Fricas [B] (verification not implemented)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf
count of optimal. 2749 vs. \(2 (521) = 1042\).
Time = 0.37 (sec) , antiderivative size = 2749, normalized size of antiderivative = 4.56
\[
\int (c+d x)^3 (a+b \cot (e+f x))^3 \, dx=\text {Too large to display}
\]
[In]
integrate((d*x+c)^3*(a+b*cot(f*x+e))^3,x, algorithm="fricas")
[Out]
-1/8*(2*(a^3 - 3*a*b^2)*d^3*f^4*x^4 - 8*b^3*c^3*f^3 - 8*(b^3*d^3*f^3 - (a^3 - 3*a*b^2)*c*d^2*f^4)*x^3 - 12*(2*
b^3*c*d^2*f^3 - (a^3 - 3*a*b^2)*c^2*d*f^4)*x^2 - 8*(3*b^3*c^2*d*f^3 - (a^3 - 3*a*b^2)*c^3*f^4)*x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)*c^2*d*e*f^2 + 3*(3*a*b^2*d^3*f^2 + (3*a^2*b - b^3)*c*d^2*f^3)*x^2 + 3*(6*a*b^2*c*d^2*e - (3*a^
2*b - b^3)*c*d^2*e^2)*f + 3*(6*a*b^2*c*d^2*f^2 + b^3*d^3*f + (3*a^2*b - b^3)*c^2*d*f^3)*x)*cos(2*f*x + 2*e))*l
og(-cos(2*f*x + 2*e) + I*sin(2*f*x + 2*e) + 1) + 4*((3*a^2*b - b^3)*d^3*f^3*x^3 - 9*a*b^2*d^3*e^2 + 3*b^3*d^3*
e + (3*a^2*b - b^3)*d^3*e^3 + 3*(3*a^2*b - b^3)*c^2*d*e*f^2 + 3*(3*a*b^2*d^3*f^2 + (3*a^2*b - b^3)*c*d^2*f^3)*
x^2 + 3*(6*a*b^2*c*d^2*e - (3*a^2*b - b^3)*c*d^2*e^2)*f + 3*(6*a*b^2*c*d^2*f^2 + b^3*d^3*f + (3*a^2*b - b^3)*c
^2*d*f^3)*x - ((3*a^2*b - b^3)*d^3*f^3*x^3 - 9*a*b^2*d^3*e^2 + 3*b^3*d^3*e + (3*a^2*b - b^3)*d^3*e^3 + 3*(3*a^
2*b - b^3)*c^2*d*e*f^2 + 3*(3*a*b^2*d^3*f^2 + (3*a^2*b - b^3)*c*d^2*f^3)*x^2 + 3*(6*a*b^2*c*d^2*e - (3*a^2*b -
b^3)*c*d^2*e^2)*f + 3*(6*a*b^2*c*d^2*f^2 + b^3*d^3*f + (3*a^2*b - b^3)*c^2*d*f^3)*x)*cos(2*f*x + 2*e))*log(-c
os(2*f*x + 2*e) - I*sin(2*f*x + 2*e) + 1) + 3*(-I*(3*a^2*b - b^3)*d^3*cos(2*f*x + 2*e) + I*(3*a^2*b - b^3)*d^3
)*polylog(4, cos(2*f*x + 2*e) + I*sin(2*f*x + 2*e)) + 3*(I*(3*a^2*b - b^3)*d^3*cos(2*f*x + 2*e) - I*(3*a^2*b -
b^3)*d^3)*polylog(4, cos(2*f*x + 2*e) - I*sin(2*f*x + 2*e)) + 6*(3*a*b^2*d^3 + (3*a^2*b - b^3)*d^3*f*x + (3*a
^2*b - b^3)*c*d^2*f - (3*a*b^2*d^3 + (3*a^2*b - b^3)*d^3*f*x + (3*a^2*b - b^3)*c*d^2*f)*cos(2*f*x + 2*e))*poly
log(3, cos(2*f*x + 2*e) + I*sin(2*f*x + 2*e)) + 6*(3*a*b^2*d^3 + (3*a^2*b - b^3)*d^3*f*x + (3*a^2*b - b^3)*c*d
^2*f - (3*a*b^2*d^3 + (3*a^2*b - b^3)*d^3*f*x + (3*a^2*b - b^3)*c*d^2*f)*cos(2*f*x + 2*e))*polylog(3, cos(2*f*
x + 2*e) - I*sin(2*f*x + 2*e)) - 12*(2*a*b^2*d^3*f^3*x^3 + 2*a*b^2*c^3*f^3 + b^3*c^2*d*f^2 + (6*a*b^2*c*d^2*f^
3 + b^3*d^3*f^2)*x^2 + 2*(3*a*b^2*c^2*d*f^3 + b^3*c*d^2*f^2)*x)*sin(2*f*x + 2*e))/(f^4*cos(2*f*x + 2*e) - f^4)
Sympy [F]
\[
\int (c+d x)^3 (a+b \cot (e+f x))^3 \, dx=\int \left (a + b \cot {\left (e + f x \right )}\right )^{3} \left (c + d x\right )^{3}\, dx
\]
[In]
integrate((d*x+c)**3*(a+b*cot(f*x+e))**3,x)
[Out]
Integral((a + b*cot(e + f*x))**3*(c + d*x)**3, x)
Maxima [B] (verification not implemented)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf
count of optimal. 11252 vs. \(2 (521) = 1042\).
Time = 15.55 (sec) , antiderivative size = 11252, normalized size of antiderivative = 18.66
\[
\int (c+d x)^3 (a+b \cot (e+f x))^3 \, dx=\text {Too large to display}
\]
[In]
integrate((d*x+c)^3*(a+b*cot(f*x+e))^3,x, algorithm="maxima")
[Out]
1/4*(4*(f*x + e)*a^3*c^3 + (f*x + e)^4*a^3*d^3/f^3 - 4*(f*x + e)^3*a^3*d^3*e/f^3 + 6*(f*x + e)^2*a^3*d^3*e^2/f
^3 - 4*(f*x + e)*a^3*d^3*e^3/f^3 + 4*(f*x + e)^3*a^3*c*d^2/f^2 - 12*(f*x + e)^2*a^3*c*d^2*e/f^2 + 12*(f*x + e)
*a^3*c*d^2*e^2/f^2 + 6*(f*x + e)^2*a^3*c^2*d/f - 12*(f*x + e)*a^3*c^2*d*e/f + 12*a^2*b*c^3*log(sin(f*x + e)) -
12*a^2*b*d^3*e^3*log(sin(f*x + e))/f^3 + 36*a^2*b*c*d^2*e^2*log(sin(f*x + e))/f^2 - 36*a^2*b*c^2*d*e*log(sin(
f*x + e))/f - 4*(24*a*b^2*d^3*e^3 - 24*a*b^2*c^3*f^3 + (3*a^2*b - 3*I*a*b^2 - b^3)*(f*x + e)^4*d^3 - 12*b^3*d^
3*e^2 - 4*((3*a^2*b - 3*I*a*b^2 - b^3)*d^3*e - (3*a^2*b - 3*I*a*b^2 - b^3)*c*d^2*f)*(f*x + e)^3 + 6*((3*a^2*b
- 3*I*a*b^2 - b^3)*d^3*e^2 - 2*(3*a^2*b - 3*I*a*b^2 - b^3)*c*d^2*e*f + (3*a^2*b - 3*I*a*b^2 - b^3)*c^2*d*f^2)*
(f*x + e)^2 + 12*(6*a*b^2*c^2*d*e - b^3*c^2*d)*f^2 - 4*((-3*I*a*b^2 - b^3)*d^3*e^3 + 3*(3*I*a*b^2 + b^3)*c*d^2
*e^2*f + 3*(-3*I*a*b^2 - b^3)*c^2*d*e*f^2 + (3*I*a*b^2 + b^3)*c^3*f^3)*(f*x + e) - 24*(3*a*b^2*c*d^2*e^2 - b^3
*c*d^2*e)*f - 4*(b^3*d^3*e^3 - b^3*c^3*f^3 + 9*a*b^2*d^3*e^2 + (3*a^2*b - b^3)*(f*x + e)^3*d^3 - 3*b^3*d^3*e +
3*(3*a*b^2*d^3 - (3*a^2*b - b^3)*d^3*e + (3*a^2*b - b^3)*c*d^2*f)*(f*x + e)^2 + 3*(b^3*c^2*d*e + 3*a*b^2*c^2*
d)*f^2 - 3*(6*a*b^2*d^3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*x + e)^2 - 3*(6*a*b^2*d^3*e - b^3*d^3 - (3*a^2*b - b^3)*d^3*e^2 - (3*a^2*b
- b^3)*c^2*d*f^2 - 2*(3*a*b^2*c*d^2 - (3*a^2*b - b^3)*c*d^2*e)*f)*(f*x + e))*cos(4*f*x + 4*e) - 2*((3*a^2*b -
b^3)*(f*x + e)^3*d^3 + 3*(3*a*b^2*d^3 - (3*a^2*b - b^3)*d^3*e + (3*a^2*b - b^3)*c*d^2*f)*(f*x + e)^2 - 3*(6*a
*b^2*d^3*e - b^3*d^3 - (3*a^2*b - b^3)*d^3*e^2 - (3*a^2*b - b^3)*c^2*d*f^2 - 2*(3*a*b^2*c*d^2 - (3*a^2*b - b^3
)*c*d^2*e)*f)*(f*x + e))*cos(2*f*x + 2*e) - ((-3*I*a^2*b + I*b^3)*(f*x + e)^3*d^3 + 3*(-3*I*a*b^2*d^3 + (3*I*a
^2*b - I*b^3)*d^3*e + (-3*I*a^2*b + I*b^3)*c*d^2*f)*(f*x + e)^2 + 3*(6*I*a*b^2*d^3*e - I*b^3*d^3 + (-3*I*a^2*b
+ I*b^3)*d^3*e^2 + (-3*I*a^2*b + I*b^3)*c^2*d*f^2 + 2*(-3*I*a*b^2*c*d^2 + (3*I*a^2*b - I*b^3)*c*d^2*e)*f)*(f*
x + e))*sin(4*f*x + 4*e) - 2*((3*I*a^2*b - I*b^3)*(f*x + e)^3*d^3 + 3*(3*I*a*b^2*d^3 + (-3*I*a^2*b + I*b^3)*d^
3*e + (3*I*a^2*b - I*b^3)*c*d^2*f)*(f*x + e)^2 + 3*(-6*I*a*b^2*d^3*e + I*b^3*d^3 + (3*I*a^2*b - I*b^3)*d^3*e^2
+ (3*I*a^2*b - I*b^3)*c^2*d*f^2 + 2*(3*I*a*b^2*c*d^2 + (-3*I*a^2*b + I*b^3)*c*d^2*e)*f)*(f*x + e))*sin(2*f*x
+ 2*e))*arctan2(sin(f*x + e), -cos(f*x + e) + 1) + ((3*a^2*b - 3*I*a*b^2 -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*b^2 - b^3)*c^3*f^3 - 3*(3*a*b^2 - I*b
^3)*d^3*e^2 - 3*((3*I*a*b^2 + b^3)*c^2*d*e + (3*a*b^2 - I*b^3)*c^2*d)*f^2 - 3*(b^3*c*d^2 + (-3*I*a*b^2 - b^3)*
c*d^2*e^2 - 2*(3*a*b^2 - I*b^3)*c*d^2*e)*f)*(f*x + e) + 12*(b^3*c*d^2*e - (3*a*b^2 + I*b^3)*c*d^2*e^2)*f)*cos(
2*f*x + 2*e) - 12*(6*a*b^2*d^3*e - (3*a^2*b - b^3)*(f*x + e)^2*d^3 - b^3*d^3 - (3*a^2*b - b^3)*d^3*e^2 - (3*a^
2*b - b^3)*c^2*d*f^2 - 2*(3*a*b^2*d^3 - (3*a^2*b - b^3)*d^3*e + (3*a^2*b - b^3)*c*d^2*f)*(f*x + e) - 2*(3*a*b^
2*c*d^2 - (3*a^2*b - b^3)*c*d^2*e)*f + (6*a*b^2*d^3*e - (3*a^2*b - b^3)*(f*x + e)^2*d^3 - b^3*d^3 - (3*a^2*b -
b^3)*d^3*e^2 - (3*a^2*b - b^3)*c^2*d*f^2 - 2*(3*a*b^2*d^3 - (3*a^2*b - b^3)*d^3*e + (3*a^2*b - b^3)*c*d^2*f)*
(f*x + e) - 2*(3*a*b^2*c*d^2 - (3*a^2*b - b^3)*c*d^2*e)*f)*cos(4*f*x + 4*e) - 2*(6*a*b^2*d^3*e - (3*a^2*b - b^
3)*(f*x + e)^2*d^3 - b^3*d^3 - (3*a^2*b - b^3)*d^3*e^2 - (3*a^2*b - b^3)*c^2*d*f^2 - 2*(3*a*b^2*d^3 - (3*a^2*b
- b^3)*d^3*e + (3*a^2*b - b^3)*c*d^2*f)*(f*x + e) - 2*(3*a*b^2*c*d^2 - (3*a^2*b - b^3)*c*d^2*e)*f)*cos(2*f*x
+ 2*e) + (6*I*a*b^2*d^3*e + (-3*I*a^2*b + I*b^3)*(f*x + e)^2*d^3 - I*b^3*d^3 + (-3*I*a^2*b + I*b^3)*d^3*e^2 +
(-3*I*a^2*b + I*b^3)*c^2*d*f^2 + 2*(-3*I*a*b^2*d^3 + (3*I*a^2*b - I*b^3)*d^3*e + (-3*I*a^2*b + I*b^3)*c*d^2*f)
*(f*x + e) + 2*(-3*I*a*b^2*c*d^2 + (3*I*a^2*b - I*b^3)*c*d^2*e)*f)*sin(4*f*x + 4*e) + 2*(-6*I*a*b^2*d^3*e + (3
*I*a^2*b - I*b^3)*(f*x + e)^2*d^3 + I*b^3*d^3 + (3*I*a^2*b - I*b^3)*d^3*e^2 + (3*I*a^2*b - I*b^3)*c^2*d*f^2 +
2*(3*I*a*b^2*d^3 + (-3*I*a^2*b + I*b^3)*d^3*e + (3*I*a^2*b - I*b^3)*c*d^2*f)*(f*x + e) + 2*(3*I*a*b^2*c*d^2 +
(-3*I*a^2*b + I*b^3)*c*d^2*e)*f)*sin(2*f*x + 2*e))*dilog(-e^(I*f*x + I*e)) - 12*(6*a*b^2*d^3*e - (3*a^2*b - b^
3)*(f*x + e)^2*d^3 - b^3*d^3 - (3*a^2*b - b^3)*d^3*e^2 - (3*a^2*b - b^3)*c^2*d*f^2 - 2*(3*a*b^2*d^3 - (3*a^2*b
- b^3)*d^3*e + (3*a^2*b - b^3)*c*d^2*f)*(f*x + e) - 2*(3*a*b^2*c*d^2 - (3*a^2*b - b^3)*c*d^2*e)*f + (6*a*b^2*
d^3*e - (3*a^2*b - b^3)*(f*x + e)^2*d^3 - b^3*d^3 - (3*a^2*b - b^3)*d^3*e^2 - (3*a^2*b - b^3)*c^2*d*f^2 - 2*(3
*a*b^2*d^3 - (3*a^2*b - b^3)*d^3*e + (3*a^2*b - b^3)*c*d^2*f)*(f*x + e) - 2*(3*a*b^2*c*d^2 - (3*a^2*b - b^3)*c
*d^2*e)*f)*cos(4*f*x + 4*e) - 2*(6*a*b^2*d^3*e - (3*a^2*b - b^3)*(f*x + e)^2*d^3 - b^3*d^3 - (3*a^2*b - b^3)*d
^3*e^2 - (3*a^2*b - b^3)*c^2*d*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b^3)*c*d^2*e)*f)*(f*x + e) + 3*(-I*b^3*c*d^2*
e^2 - 6*I*a*b^2*c*d^2*e + I*b^3*c*d^2)*f)*cos(2*f*x + 2*e) + (b^3*d^3*e^3 - b^3*c^3*f^3 + 9*a*b^2*d^3*e^2 + (3
*a^2*b - b^3)*(f*x + e)^3*d^3 - 3*b^3*d^3*e + 3*(3*a*b^2*d^3 - (3*a^2*b - b^3)*d^3*e + (3*a^2*b - b^3)*c*d^2*f
)*(f*x + e)^2 + 3*(b^3*c^2*d*e + 3*a*b^2*c^2*d)*f^2 - 3*(6*a*b^2*d^3*e - b^3*d^3 - (3*a^2*b - b^3)*d^3*e^2 - (
3*a^2*b - b^3)*c^2*d*f^2 - 2*(3*a*b^2*c*d^2 - (3*a^2*b - b^3)*c*d^2*e)*f)*(f*x + e) - 3*(b^3*c*d^2*e^2 + 6*a*b
^2*c*d^2*e - b^3*c*d^2)*f)*sin(4*f*x + 4*e) - 2*(b^3*d^3*e^3 - b^3*c^3*f^3 + 9*a*b^2*d^3*e^2 + (3*a^2*b - b^3)
*(f*x + e)^3*d^3 - 3*b^3*d^3*e + 3*(3*a*b^2*d^3 - (3*a^2*b - b^3)*d^3*e + (3*a^2*b - b^3)*c*d^2*f)*(f*x + e)^2
+ 3*(b^3*c^2*d*e + 3*a*b^2*c^2*d)*f^2 - 3*(6*a*b^2*d^3*e - b^3*d^3 - (3*a^2*b - b^3)*d^3*e^2 - (3*a^2*b - b^3
)*c^2*d*f^2 - 2*(3*a*b^2*c*d^2 - (3*a^2*b - b^3)*c*d^2*e)*f)*(f*x + e) - 3*(b^3*c*d^2*e^2 + 6*a*b^2*c*d^2*e -
b^3*c*d^2)*f)*sin(2*f*x + 2*e))*log(cos(f*x + e)^2 + sin(f*x + e)^2 - 2*cos(f*x + e) + 1) - 24*((3*a^2*b - b^3
)*d^3*cos(4*f*x + 4*e) - 2*(3*a^2*b - b^3)*d^3*cos(2*f*x + 2*e) + (3*I*a^2*b - I*b^3)*d^3*sin(4*f*x + 4*e) + 2
*(-3*I*a^2*b + I*b^3)*d^3*sin(2*f*x + 2*e) + (3*a^2*b - b^3)*d^3)*polylog(4, -e^(I*f*x + I*e)) - 24*((3*a^2*b
- b^3)*d^3*cos(4*f*x + 4*e) - 2*(3*a^2*b - b^3)*d^3*cos(2*f*x + 2*e) + (3*I*a^2*b - I*b^3)*d^3*sin(4*f*x + 4*e
) + 2*(-3*I*a^2*b + I*b^3)*d^3*sin(2*f*x + 2*e) + (3*a^2*b - b^3)*d^3)*polylog(4, e^(I*f*x + I*e)) - 24*(-3*I*
a*b^2*d^3 + (-3*I*a^2*b + I*b^3)*(f*x + e)*d^3 + (3*I*a^2*b - I*b^3)*d^3*e + (-3*I*a^2*b + I*b^3)*c*d^2*f + (-
3*I*a*b^2*d^3 + (-3*I*a^2*b + I*b^3)*(f*x + e)*d^3 + (3*I*a^2*b - I*b^3)*d^3*e + (-3*I*a^2*b + I*b^3)*c*d^2*f)
*cos(4*f*x + 4*e) + 2*(3*I*a*b^2*d^3 + (3*I*a^2*b - I*b^3)*(f*x + e)*d^3 + (-3*I*a^2*b + I*b^3)*d^3*e + (3*I*a
^2*b - I*b^3)*c*d^2*f)*cos(2*f*x + 2*e) + (3*a*b^2*d^3 + (3*a^2*b - b^3)*(f*x + e)*d^3 - (3*a^2*b - b^3)*d^3*e
+ (3*a^2*b - b^3)*c*d^2*f)*sin(4*f*x + 4*e) - 2*(3*a*b^2*d^3 + (3*a^2*b - b^3)*(f*x + e)*d^3 - (3*a^2*b - b^3
)*d^3*e + (3*a^2*b - b^3)*c*d^2*f)*sin(2*f*x + 2*e))*polylog(3, -e^(I*f*x + I*e)) - 24*(-3*I*a*b^2*d^3 + (-3*I
*a^2*b + I*b^3)*(f*x + e)*d^3 + (3*I*a^2*b - I*b^3)*d^3*e + (-3*I*a^2*b + I*b^3)*c*d^2*f + (-3*I*a*b^2*d^3 + (
-3*I*a^2*b + I*b^3)*(f*x + e)*d^3 + (3*I*a^2*b - I*b^3)*d^3*e + (-3*I*a^2*b + I*b^3)*c*d^2*f)*cos(4*f*x + 4*e)
+ 2*(3*I*a*b^2*d^3 + (3*I*a^2*b - I*b^3)*(f*x + e)*d^3 + (-3*I*a^2*b + I*b^3)*d^3*e + (3*I*a^2*b - I*b^3)*c*d
^2*f)*cos(2*f*x + 2*e) + (3*a*b^2*d^3 + (3*a^2*b - b^3)*(f*x + e)*d^3 - (3*a^2*b - b^3)*d^3*e + (3*a^2*b - b^3
)*c*d^2*f)*sin(4*f*x + 4*e) - 2*(3*a*b^2*d^3 + (3*a^2*b - b^3)*(f*x + e)*d^3 - (3*a^2*b - b^3)*d^3*e + (3*a^2*
b - b^3)*c*d^2*f)*sin(2*f*x + 2*e))*polylog(3, e^(I*f*x + I*e)) + ((3*I*a^2*b + 3*a*b^2 - I*b^3)*(f*x + e)^4*d
^3 - 4*(-6*I*a*b^2*d^3 + (3*I*a^2*b + 3*a*b^2 - I*b^3)*d^3*e + (-3*I*a^2*b - 3*a*b^2 + I*b^3)*c*d^2*f)*(f*x +
e)^3 - 6*(12*I*a*b^2*d^3*e - 2*I*b^3*d^3 + (-3*I*a^2*b - 3*a*b^2 + I*b^3)*d^3*e^2 + (-3*I*a^2*b - 3*a*b^2 + I*
b^3)*c^2*d*f^2 + 2*(-6*I*a*b^2*c*d^2 + (3*I*a^2*b + 3*a*b^2 - I*b^3)*c*d^2*e)*f)*(f*x + e)^2 - 4*(-18*I*a*b^2*
d^3*e^2 + 6*I*b^3*d^3*e + (3*a*b^2 - I*b^3)*d^3*e^3 - (3*a*b^2 - I*b^3)*c^3*f^3 + 3*(-6*I*a*b^2*c^2*d + (3*a*b
^2 - I*b^3)*c^2*d*e)*f^2 + 3*(12*I*a*b^2*c*d^2*e - 2*I*b^3*c*d^2 - (3*a*b^2 - I*b^3)*c*d^2*e^2)*f)*(f*x + e))*
sin(4*f*x + 4*e) - 2*((3*I*a^2*b + 3*a*b^2 - I*b^3)*(f*x + e)^4*d^3 - 6*I*b^3*d^3*e^2 + 4*(3*I*a*b^2 - b^3)*d^
3*e^3 + 4*(-3*I*a*b^2 + b^3)*c^3*f^3 + 4*((-3*I*a^2*b - 3*a*b^2 + I*b^3)*d^3*e + (3*I*a^2*b + 3*a*b^2 - I*b^3)
*c*d^2*f + (3*I*a*b^2 + b^3)*d^3)*(f*x + e)^3 + 6*(I*b^3*d^3 + (3*I*a^2*b + 3*a*b^2 - I*b^3)*d^3*e^2 + (3*I*a^
2*b + 3*a*b^2 - I*b^3)*c^2*d*f^2 + 2*(-3*I*a*b^2 - b^3)*d^3*e + 2*((-3*I*a^2*b - 3*a*b^2 + I*b^3)*c*d^2*e + (3
*I*a*b^2 + b^3)*c*d^2)*f)*(f*x + e)^2 + 6*(-I*b^3*c^2*d + 2*(3*I*a*b^2 - b^3)*c^2*d*e)*f^2 + 4*(-3*I*b^3*d^3*e
- (3*a*b^2 - I*b^3)*d^3*e^3 + (3*a*b^2 - I*b^3)*c^3*f^3 + 3*(3*I*a*b^2 + b^3)*d^3*e^2 - 3*((3*a*b^2 - I*b^3)*
c^2*d*e - (3*I*a*b^2 + b^3)*c^2*d)*f^2 + 3*(I*b^3*c*d^2 + (3*a*b^2 - I*b^3)*c*d^2*e^2 + 2*(-3*I*a*b^2 - b^3)*c
*d^2*e)*f)*(f*x + e) + 12*(I*b^3*c*d^2*e + (-3*I*a*b^2 + b^3)*c*d^2*e^2)*f)*sin(2*f*x + 2*e))/(-4*I*f^3*cos(4*
f*x + 4*e) + 8*I*f^3*cos(2*f*x + 2*e) + 4*f^3*sin(4*f*x + 4*e) - 8*f^3*sin(2*f*x + 2*e) - 4*I*f^3))/f
Giac [F]
\[
\int (c+d x)^3 (a+b \cot (e+f x))^3 \, dx=\int { {\left (d x + c\right )}^{3} {\left (b \cot \left (f x + e\right ) + a\right )}^{3} \,d x }
\]
[In]
integrate((d*x+c)^3*(a+b*cot(f*x+e))^3,x, algorithm="giac")
[Out]
integrate((d*x + c)^3*(b*cot(f*x + e) + a)^3, x)
Mupad [F(-1)]
Timed out. \[
\int (c+d x)^3 (a+b \cot (e+f x))^3 \, dx=\int {\left (a+b\,\mathrm {cot}\left (e+f\,x\right )\right )}^3\,{\left (c+d\,x\right )}^3 \,d x
\]
[In]
int((a + b*cot(e + f*x))^3*(c + d*x)^3,x)
[Out]
int((a + b*cot(e + f*x))^3*(c + d*x)^3, x)